<?php
/**
 * /depot/library/models/Object/User/Identity.php
 * @author qqinxl
 * 2008/03/24
 * 
 * @category  
 * @package  
 * @copyright  Copyright (c) {}
 */
class Object_User_Identity {
	const ANONYMOUS = 0 ;	
	const USER = 1 ;	
	const ADMIN = 99;
	
	public static function get($type = null,$isTranslate = true){
		$array[self::ANONYMOUS] = 'anonymous';
		$array[self::USER] = 'user';
		$array[self::ADMIN] = 'admin';
		if ($isTranslate) {
			$str = 'user.identity.';
			$array = self::_($array,$str);
		}
		if(empty($type)){
			return $array;
		}
		return isset($array[$type])?$array[$type]:null;
	}
}